//package com.websocet.interceptor;
//
///**
// * @Author: 陈玉鹏
// * @Description: TODO
// * @DateTime: 2023/7/2 18:02
// */
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//import com.websocet.utils.EncryptionUtils;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerInterceptor;
//import org.springframework.web.servlet.ModelAndView;
//
//@Component
//public class ResponseEncryptionInterceptor implements HandlerInterceptor {
//    @Override
//    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
//                           ModelAndView modelAndView) throws Exception {
//        // 对返回值进行加密处理
//        if (modelAndView != null && modelAndView.getModel().containsKey("data")) {
//            String originalData = (String) modelAndView.getModel().get("data");
//            String encryptedData = EncryptionUtils.encrypt(originalData);
//            modelAndView.getModel().put("data", encryptedData);
//        }
//    }
//}